<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

<!--    <meta http-equiv="refresh" content="3">-->

    <title>增加浏览量</title>

</head>

<body>
    <h1>
        刷新次数：<span id="times"></span> 
    </h1>
    <h1>
        本次等待：<span id="sleep_seconds"></span> 秒
    </h1>

<iframe id="changan" frameborder=1 scrolling=yes width="100%" height=500px 
    src=https://home.changan.com.cn/share/#/info_details?id=156910&sharer=92868></iframe>

</body>

<script>
    var seconds = Math.round(Math.random() * 60)
    document.getElementById("times").innerText=window.localStorage.getItem('times');
    document.getElementById("sleep_seconds").innerText=seconds;
    function flush(){
        var times = window.localStorage.getItem('times');
        console.log(times)
        if (times==undefined){
            times = 1
        }else{
            times++;
        }
        window.localStorage.setItem('times', times);
        console.log('间隔:', seconds);
        location.reload()
    }
    setTimeout(flush,seconds* 1000);
</script>


</html>